package org.example.javafxdemo;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class MarkdownPreviewApp extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception {
        // 加载FXML文件
        FXMLLoader loader = new FXMLLoader(getClass().getResource("MarkdownPreview.fxml"));
        Parent root = loader.load();

        // 获取控制器
        MarkdownPreviewController controller = loader.getController();

        // 设置场景
        Scene scene = new Scene(root, 800, 600);
        primaryStage.setScene(scene);
        primaryStage.setTitle("Markdown Preview");
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
